import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    //登录隐藏显示
    isshowlogin: false,
    toastMsg: '',
    isshowtoast: false,
    toastIcon: 'icon-toast_chenggong'
  },
  mutations: {
    xgshowlogin(state, payload) {
      state.isshowlogin = payload
    },


    // toast的显示隐藏
    showToast(state, payload) {
      state.isshowtoast = true
      state.toastMsg = payload.msg
      state.toastIcon = payload.type
    },
    hideToast(state) {
      state.isshowtoast = false
    }
  },
  actions: {
  },
  modules: {
  }
})
